<?php
class home extends CP_Controller {

    function __construct() {
        parent::__construct('block','block_','id');
    }

    function index(){
        echo $c=$this->load->view('cms/cp/04_home/viewport',$this->assigns,true);
    }
    
    function editpanel(){
        $Id=(int)$this->input->post('Id');
        if($Id>0)
            $this->assigns->item=$this->backend_model->onGet($Id);
        $c=$this->load->view('cms/cp/04_home/editpanel',$this->assigns,true);
        $R["result"] = 1;
        $R["message"]='SUCCESS !';
        $R["htmlreponse"]=$c;
        $this->output->set_header('Content-type: application/json');
        $this->output->set_output(json_encode($R));
    }
    
}

?>